mini-os/tpm{back, front}: Change shared page ABI
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Thu, 11 Apr 2013 16:20:25 +0000 (12:20 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 12 Apr 2013 13:28:17 +0000 (14:28 +0100)
commitf494d9f3c37542435239236085be25c820912304
tree571f23e359f4ba4c78c818ef288147dbd0f563ae
parentc1f0b214536773630cd5f16bf3d275015373555b
mini-os/tpm{back, front}: Change shared page ABI

This changes the vTPM shared page ABI from a copy of the Xen network
interface to a single-page interface that better reflects the expected
behavior of a TPM: only a single request packet can be sent at any given
time, and every packet sent generates a single response packet. This
protocol change should also increase efficiency as it avoids mapping and
unmapping grants when possible. The vtpm xenbus device now requires a
feature-protocol-v2 node in xenstore to avoid conflicts with existing
(xen-patched) kernels supporting the old interface.

While the contents of the shared page have been defined to allow packets
larger than a single page (actually 4088 bytes) by allowing the client
to add extra grant references, the mapping of these extra references has
not been implemented; a feature node in xenstore may be used in the
future to indicate full support for the multi-page protocol. Most uses
of the TPM should not require this feature.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: Jan Beulich <JBeulich@suse.com>
extras/mini-os/include/tpmback.h
extras/mini-os/include/tpmfront.h
extras/mini-os/tpmback.c
extras/mini-os/tpmfront.c
xen/include/public/io/tpmif.h